<!--like do facebook-->
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/pt_BR/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<?php
/*
Template Name: Single Post
*/
?>
<?php get_header(); ?>

<div id="content" class="content-singular content-single">
	<div class="pad">
		<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<?php while (have_posts()) : ?>
	<?php the_post(); ?>

<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>		
<div class="content">
	<?php the_content(); ?>
	<?php wp_link_pages(array('before' => '<p class="pages"><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>

<?php
	$desc = get_the_author_meta('description');
	if (!empty($desc)) {
?>
<div class="post-box post-box-about-author">
	<div class="title">
		<h2>Sobre o autor</h2>
	</div>
	<div class="interior">
		<?php echo get_avatar(get_the_author_meta('email'),53) ?>
		<p><?php echo $desc; ?></p>
		<div class="clear"></div>
	</div>
</div>
<?php 
	}
?>
<div class="post-box post-box-sb">
	<div class="interior">
            <div id="fb-root"></div>
            <!--curtir facebook-->
            <div class="fb-like" data-href="<?php the_permalink() ?>" data-send="false" data-layout="box_count" data-width="70" data-show-faces="false"></div>&nbsp;
            <!--twitter botao twetar-->
            <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="@paulinhofranz" rel="nofollow">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>&nbsp;
            <!-- +1 google plus -->
            <div class="g-plusone" data-size="tall"></div>
	</div>
</div><br/><br/>
<?php 
	$enabled = get_option(PADD_THEME_SLUG . '_rp_enable');
	if ($enabled) { 
?>
<div class="post-box post-box-related">
	<div class="title">
		<h2>Posts Relacionados</h2>
	</div>
	<div class="interior">
		<?php
			padd_related_posts(get_the_ID());
		?>
	</div>
</div>
<?php } ?>
<?php comments_template('',true); ?>
<?php endwhile; ?>

		</div>
	</div>
</div>

<?php get_sidebar(); ?>

<div class="clear"></div>
<script type="text/javascript">
  window.___gcfg = {lang: 'pt-BR'};

  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>
<?php get_footer(); ?>